package com.ruoyi.base.api;

import com.ruoyi.base.api.domain.Inventory;
import com.ruoyi.base.api.domain.InvVo;
import com.ruoyi.base.api.factory.InventoryFallbackFactory;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.web.domain.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(contextId = "InventoryService", value = ServiceNameConstants.BASE_SERVICE, fallbackFactory = InventoryFallbackFactory.class)
public interface InventoryService {

    @PutMapping("/inventory")
    public AjaxResult edit(@RequestBody Inventory inventory);

    @GetMapping(value = "/inventory/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id);

    @PostMapping("/inventory")
    public AjaxResult add(@RequestBody Inventory inventory) ;

    @PostMapping("/inventory/save")
    AjaxResult save(@RequestBody Inventory inventory);
}
